﻿using furion.blog.Domain.Shared.ValidateAttribute;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace furion.blog.Domain.Shared.Dto.Shop
{
    /// <summary>
    /// 门店新增或临时保存 表单
    /// </summary>
    public class ShopSubmitCheckDto
    {
        public long? ShopId { get; set; } = null;

        public long MemberId { get; set; }

        /// <summary>
        /// 点铺名称
        /// </summary>
        [JsonProperty(PropertyName = "shopName")]
        [Required(ErrorMessage = "填写门店名称")]
        public string ShopName { get; set; } = string.Empty;
        /// <summary>
        /// 点铺海报
        /// </summary>
        [JsonProperty(PropertyName = "poster")]
        [Required(ErrorMessage = "上传门店头像")]
        public string Poster { get; set; } = string.Empty;
        /// <summary>
        /// 公司类型
        /// </summary>
        [JsonProperty(PropertyName = "shopType")]
        [Required(ErrorMessage = "选择类型")]
        [ValuesValidateAttribute(ErrorMessage = "类型有误", StrValues = new string[]{"Personal","Company"})]
        public string ShopType { get; set; } = string.Empty;

        [JsonProperty(PropertyName = "idOnPic")]
        [Required(ErrorMessage = "上传身份证正面")]
        public string IdOnPic { get; set; } = string.Empty;

        [JsonProperty(PropertyName = "idOffPic")]
        [Required(ErrorMessage = "上传身份证返面")]
        public string IdOffPic { get; set; } = string.Empty;

        [JsonProperty(PropertyName = "idHandPic")]
        [Required(ErrorMessage = "上传手持身份证照")]
        public string IdHandPic { get; set; } = string.Empty;


        [JsonProperty(PropertyName = "idNum")]
        [Required(ErrorMessage = "填写身份证号码")]
        [IdNumValidateAttribute]
        public string IdNum { get; set; } = string.Empty;

        [JsonProperty(PropertyName = "businessNum")]
        public string BusinessNum { get; set; } = string.Empty;

        [JsonProperty(PropertyName = "businessPic")]
        public string BusinessPic { get; set; } = string.Empty;

        [JsonProperty(PropertyName = "charger")]
        [Required(ErrorMessage = "填写负责人")]
        public string Charger { get; set; } = string.Empty;

        [JsonProperty(PropertyName = "phone")]
        [Required(ErrorMessage = "填写电话")]
        [PhoneValidateAttribute(ErrorMessage = "电话有误")]
        public string Phone { get; set; } = string.Empty;

        [JsonProperty(PropertyName = "wechat")]
        [Required(ErrorMessage = "填写微信")]
        public string Wechat { get; set; } = string.Empty;

        [JsonProperty(PropertyName = "addr")]
        [Required(ErrorMessage = "填写地址")]
        public string Addr { get; set; } = string.Empty;

        [JsonProperty(PropertyName = "location")]
        [Required(ErrorMessage = "选择定位")]
        public JObject? Location { get; set; } = null;

        [JsonProperty(PropertyName = "intro")]
        public string Intro { get; set; } = string.Empty;

        [JsonProperty(PropertyName = "skills")]
        public List<string>? Skills { get; set; } = null;

    }
}
